import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';


import '../AppConfig/LocalStorage.dart';
import '../Tabbar/TabbarView.dart';
import 'LoginVIewController.dart';


class GuidePage extends StatefulWidget {
  const GuidePage({super.key});

  @override
  State<GuidePage> createState() => _GuidePageState();
}

class _GuidePageState extends State<GuidePage> {

   Timer? _timer;
   bool isNav=false;
   @override
   void initState() {
     // TODO: implement initState
     super.initState();
     _timer = Timer.periodic(Duration(seconds: 2), (timer) {
       // 这里是你想要执行的操作
       setState(() {
         isNav=true;
       });
     });
   }
   @override
   void dispose() {
     // 在组件销毁时取消定时器，以防止内存泄漏
     _timer?.cancel();
     super.dispose();
   }

  @override
  Widget build(BuildContext context) {
    final screenSize = MediaQuery.of(context).size;
    return isNav?TabbarView(pateIndex: 0, ):Container(color: Color.fromRGBO(241, 231, 221, 1),child: Image.asset("lib/Images/login/启动页.png",width: screenSize.width, height: screenSize.height,),);

  }
}
